-- GENERATED SPELL FOR [Temple Concubine] --


function spell0_22939(pUnit, Event) --@Love Tap,n/a--
pUnit:FullCastSpellOnTarget(41338,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22939', 4319, 1)
end

function spell1_22939(pUnit, Event) --@Polymorph,n/a--
pUnit:FullCastSpellOnTarget(41334,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22939', 16000, 1)
end

function Sorts_22939(pUnit, Event)
local choix_sorts_22939 = math.random(0, 1)
if choix_sorts_22939 == 0 then
pUnit:RegisterEvent('spell0_22939', 1, 1)
end
if choix_sorts_22939 == 1 then
pUnit:RegisterEvent('spell1_22939', 1, 1)
end
end

function mob22939_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22939', math.random(1500, 3000), 1)
end

function mob22939_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22939_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22939_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22939, 1, 'mob22939_Action')
RegisterUnitEvent(22939, 2, 'mob22939_Leave')
RegisterUnitEvent(22939, 3, 'mob22939_Kill')
RegisterUnitEvent(22939, 4, 'mob22939_Die')
